<script setup>
import {ref,onMounted} from "vue"
import getUsername from "./getUsername.vue"
import { useRouter } from 'vue-router';
const use = useRouter()
const props =  defineProps({
    value:Object,
    userId:String,
    groupId:String
})


const messages = ref([])
const userId = localStorage.getItem("userId")

onMounted(()=>{
    
   

    for(let item of props.value)
    {
        if(item.groupId == props.groupId)
        messages.value.push(item)
        console.log(messages.value)
    }

    }
)


</script>

<template>

</template>

<style>

</style>